const bill = function(products, freight) {
    let  total = 0
    for(let i = 0; i < products.length; i++ ) {
        total = total + products[i] + freight
    }
    return total
}

const total_price = bill([39, 99, 129], 8)
console.log(total_price)  // 291